Only enable PGE in CR4 if the CPU supports the feature.
Signed-off-by: Keir Fraser <keir@xensource.com>
#if CONFIG_PAGING_LEVELS > 2
unsigned long mmu_cr4_features = X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE;
#else
-unsigned long mmu_cr4_features = X86_CR4_PSE | X86_CR4_PGE;
+unsigned long mmu_cr4_features = X86_CR4_PSE;
#endif
EXPORT_SYMBOL(mmu_cr4_features);
if ( cpu_has_pge )
{
/* Suitable Xen mapping can be GLOBAL. */
+ set_in_cr4(X86_CR4_PGE);
PAGE_HYPERVISOR |= _PAGE_GLOBAL;
PAGE_HYPERVISOR_NOCACHE |= _PAGE_GLOBAL;
/* Transform early mappings (e.g., the frametable). */